package com.sumainfor.pc.epc.service.impl;

import com.sumainfor.common.util.ContextUtils;
import com.sumainfor.pc.epc.dao.CommodityMapper;
import com.sumainfor.pc.epc.dao.OrderMapper;
import com.sumainfor.pc.epc.service.CommodityService;
import com.sumainfor.pc.epc.service.OrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Description:
 */
@Service
public class OrderImplService implements OrderService {

    private ReentrantLock lock = new ReentrantLock(false);//

    Logger log = LoggerFactory.getLogger(DecorateServiceimpl.class);// 日志

    @Autowired
    private OrderMapper orderMapper;

    /**
     * 查询维修师傅被强派的工单数量
     * @param params
     * @return
     */
    @Override
    public Integer getOrderCountBySysUserId(Map<String, Object> params) {
        params.put("SysUserId", ContextUtils.getUserId());
        return  orderMapper.getOrderCountBySysUserId(params);
    }
    /**
     * 点击受理维修工单的时候新增我的工单
     * @param params
     * @return
     */
    @Override
    public Integer addOrder(Map<String, Object> params) {
        return null;
    }

    @Override
    public Map<String, Object> getBillByOrdBilIdMap(String OrdBiId) {
        return orderMapper.getBillByOrdBilIdMap(OrdBiId);
    }

}
